<?php use_helper('Object', 'Validation', 'ObjectAdmin', 'I18N', 'Date') ?>
<title><?= $sf_response->getTitle() ?></title>

<?php use_stylesheet('/sf/sf_admin/css/main') ?>

<div id="sf_admin_container">

<h1>Reject <?php if ($module == 'PO') echo $object->getPono();
else if ($module == 'BOM') echo $object->getWono();
else echo $object->getMrno(); ?></h1>

<div id="sf_admin_content">
<fieldset>

<?php echo form_tag($module.'/reject', array(
  'id'        => 'sf_admin_edit_form',
  'name'      => 'sf_admin_edit_form',
  'multipart' => true,
  'onsubmit'=>'return requireNotes()',
)) ?>

<?php echo object_input_hidden_tag($object, 'getId')?>
<input type="hidden" id = "backURL" name = "backURL" value="<?echo $backURL?>">
<div class="form-row">
  <?php echo label_for('notes', 'Notes:', 'class="required" ') ?>
  <div class="content">

  <textarea name="notes" id="notes" rows="5" cols="50"></textarea>
    </div>
</div>
</fieldset>
<ul class="sf_admin_actions">
<li>
<?
echo submit_tag(__('reject'), array (
      'name' => 'save',
      'class' => 'sf_admin_action_save',
    )) ;
    ?>
</li>
</ul>
</form>
</div>
</div>
<script language="JavaScript">
function requireNotes(){
    var notes = document.getElementById('notes');
    if (!notes.value){
        alert ('Please enter the notes!');
        notes.focus();
        return false;
    }
}
</script>